package com.trjcn.wxshare.execute;

import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.trjcn.wxshare.reqeust.CustomerMsgReq;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.*;

public interface WXShareExecute {

    /**
     * 获取access_token
     * @param
     * @return
     */
    @Headers({"Content-type: application/x-www-form-urlencoded"})
    @GET("token")
    Call<JSONObject> getAccessToken(@Query("grant_type") String grantType, @Query("appid")String appId, @Query("secret")String secret);

    /**
     * 获取ticket
     * @return
     */
    @Headers({"Content-type: application/x-www-form-urlencoded"})
    @GET("ticket/getticket")
    Call<JSONObject> getTicket(@Query("access_token")String accessToken, @Query("type")String type);

    /**
     * 微信小程序发送客服消息
     * @return
     */
    @POST("message/custom/send")
    Call<JSONObject> messageCustomSend(@Query("access_token")String accessToken, @Body RequestBody requestBody);
}
